]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
popupMenu: round spacing to an integer
authorOwen W. Taylor <otaylor@fishsoup.net>
Fri, 25 Mar 2011 22:40:38 +0000 (18:40 -0400)
committerDan Winship <danw@gnome.org>
Fri, 25 Mar 2011 22:55:40 +0000 (18:55 -0400)
StThemeNode.get_length() doesn't necessarily return an integer pixel
value, and our code produces non-integer positions in that case. So
round the spacing.

https://bugzilla.gnome.org/show_bug.cgi?id=645647

js/ui/popupMenu.js

index fc6140569e3a961f8c4a2a355eca10ad6de91d5a..99e7a336d684a9b33bc91330698e11d9f4628609 100644 (file)
@@ -61,7 +61,7 @@ PopupBaseMenuItem.prototype = {
     },
 
     _onStyleChanged: function (actor) {
-        this._spacing = actor.get_theme_node().get_length('spacing');
+        this._spacing = Math.round(actor.get_theme_node().get_length('spacing'));
     },
 
     _onButtonReleaseEvent: function (actor, event) {